package com.niuwa.p2p.entity;

/**
 * @ClassName: PageQuery
 * @Description: 分页查询类
 * @author: zhangbo
 * @date:2015年1月9日 上午9:41:29
 */
public class PageQuery {

	public static final String PAGEQUERY = "pageQuery";

	/** 当前页 */
	private long page;

	/** 每页显示记录数 */
	private long rows;

	public PageQuery() {
		this.page = 1;
		this.rows = 10;
	}

	/**
	 * @param _page
	 *            当前页
	 * @param _rows
	 *            每页显示记录数
	 */
	public PageQuery(long _page, long _rows) {
		this.page = _page;
		this.rows = _rows;
	}

	public long getPageOffset() {
		return (page - 1) * rows;
	}

	public long getPage() {
		return page;
	}

	public void setPage(long page) {
		this.page = page;
	}

	public long getRows() {
		return rows;
	}

	public void setRows(long rows) {
		this.rows = rows;
	}
}
